import { createWebHashHistory, createRouter } from "vue-router";
const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: "/",
      name: "Login",
      component: import("../components/Login.vue"),
    },
    {
      path: "/index",
      name: "Index",
      component: import("../components/Index.vue"),
      children: [
        {
          path: "",
          name: "First",
          component: import("../components/First.vue"),
        },
        //商品分类
        {
          path: "shopcategory",
          name: "ShopCategory",
          component: import("../components/shop/ShopCategory.vue"),
        },
        //商品
        {
          path: "shopping",
          name: "Shopping",
          component: import("../components/shop/Shopping.vue"),
        },
        //订单管理
        {
          path: "shoporder",
          name: "ShopOrder",
          component: import("../components/shop/ShopOrder.vue"),
        },
        //论坛板块
        {
          path: "forumplate",
          name: "ForumPlate",
          component: import("../components/forum/ForumPlate.vue"),
        },
        //论坛帖子
        {
          path: "forumlist",
          name: "ForumList",
          component: import("../components/forum/ForumList.vue"),
        },
        //活动分类
        {
          path: "activecategory",
          name: "ActiveCategory",
          component: import("../components/active/ActiveCategory.vue"),
        },
        //活动列表
        {
          path: "activelist",
          name: "ActiveList",
          component: import("../components/active/ActiveList.vue"),
        },
        {
          path: "slideshowCategory",
          name: "slideshowCategory",
          component: import("../components/slideshow/slideshowcategory.vue"),
        },
        {
          path: "slideshow",
          name: "slideshow",
          component: import("../components/slideshow/slideshow.vue"),
        },

        {
          path: "userList",
          name: "userList",
          component: import("../components/user/userList.vue"),
        },
      ],
    },
  ],
});
export default router;
